package com.rogo.rogobox
{
	import com.rogo.rogobox.views.components.consts.PageMainConst;
	import com.rogo.rogobox.views.components.windows.TipWindow;
	import com.rogo.rogobox.views.components.windows.UpdateWindow;
	import com.sina.microblog.data.MicroBlogUser;

	public class App
	{
		public function App()
		{
		}
		
		//--------------------------------------------------------------------------
		//
		//  Constants
		//
		//--------------------------------------------------------------------------
		
		public static const APP_KEY:String = '3334861340';
		public static const APP_SECRET:String = '8dd9d872c5fdad99d4cf125f6c17072d';
		public static const COPYRIGHT:String = 'Copyright 2010-2011 Rogo\'s Team';
		public static const REFRESH_INTERVAL:Number = 30000;
		public static const PAGE_COUNT:int = 20;
		public static const UPDATE_URL:String = 'http://rogosteam.sinaapp.com/config/update.xml';
		
		//--------------------------------------------------------------------------
		//
		//  Variables
		//
		//--------------------------------------------------------------------------
		
		private static var instance:App;
		public var verifyUser:MicroBlogUser;
		public var profilePageUser:MicroBlogUser;
		public var friendPageUser:MicroBlogUser;
		public var friendPageIsFollower:Boolean = false;
		
		public var mainPageDisplay:String = PageMainConst.DISPLAY_MAIN;
		public var mainPageUser:MicroBlogUser;
		
		public var updateWindow:UpdateWindow = null;
		public var tipWindow:TipWindow = null;
		
		//--------------------------------------------------------------------------
		//
		//  Methods
		//
		//--------------------------------------------------------------------------
		
		public static function getInstance():App
		{
			if (!instance)
				instance = new App();
			return instance;
		}
		
	}
}